package jdx_05_synchronized.jdx_02_小程序测试;

/*
这是一段有问题的线程
 */
public class T1 implements Runnable{
    private int count = 100;

    @Override
    //这里没有加锁
    public void run() {
        count--;
        System.out.println(Thread.currentThread().getName()+"\tcount="+count);
    }

    public static void main(String[] args) {
        T1 t = new T1();
        for (int i = 0; i < 100; i++) {
            new Thread(t,"Thread"+i).start();
        }
    }
}
